import { get, post } from '@/utils/request'

// 获取新闻列表
export const list = (params) => get('/api/news/list', params)

// 获取新闻详情
export const detail = (params) => get('/api/news/detail', params)

// 修改新闻
export const update = (data) => post('/api/news/update', data)

// 删除新闻
export const del = (params) => get('/api/news/delete', params)

// 批量删除新闻
export const delAll = (data) => post('/api/news/deleteall', data)

//类型列表
export const newstypelist = (params) => get('/api/newstype/list', params)

//添加
export const add = (data) => post('/api/news/add', data)

// 获取单条
export const getdetail = (params) => get('/api/news/get', params)
